classdef ziPIDs < ziStreamNode
    %ZIPIDS Summary of this class goes here
    %   Detailed explanation goes here
    
    properties(SetAccess = immutable)
        domain
        isTrigNode
        toSignalString
        
        toString
        toDataString
        toSwprString
        toDispString
    end
    
    methods
        function obj = ziPIDs(node, index, signal, fft_option, math_operation)
            %ZIPIDS Construct an instance of this class
            %   Detailed explanation goes here
            obj@ziStreamNode(node, index, signal, fft_option, math_operation);
            %

            prefix = 'stream/';
            
            if ~isempty(fft_option)
                fft_option = ['.val.fft.' fft_option];
                obj.domain = 'Frequency';
            else
                fft_option = '';
                obj.domain = 'Time';
            end
            
            if ~isempty(math_operation)
                operation = ['.' math_operation];
            else
                operation = '';
            end
            
            obj.isTrigNode = false;
            
            index1 = char(index+1);
            obj.toString     = [ node '/' index  '/' [prefix signal] fft_option, operation];
            obj.toDispString = [ node '/' index1 '/' [prefix signal] fft_option, operation];            
            obj.toDataString = strrep(obj.toString, '.', '_');
            obj.toSignalString = strrep([prefix signal fft_option operation], '.', '_');
            
            obj.toSwprString = obj.toDataString;
        end
    end
end

